package com.ask.server.controller;

import com.ask.pojo.entity.User;
import com.ask.server.service.IUserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/user")
@Tag(name = "用户接口")
public class UserController {

    @Autowired
    private IUserService userService;

    @PostMapping
    @Operation(summary = "新增用户")
    public String save(@RequestBody User user) {
        userService.save(user);
        return "success";
    }

}
